Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not generalize the type of every sub-pattern, only of variables #1745

Merged
merged 2 commits into from May 4, 2018

Conversation

trefis
Copy link
Contributor

@trefis trefis commented Apr 30, 2018

As I said on #1675:

in type_cases when propagate is true [...] we pull the type of every pattern (i.e. including subpatterns) to the level of the match, before trying to generalize it.
[...]
However, if I understand correctly, we don't actually need to lift & generalize the type of every subpattern, only of things added to the environment (i.e. variables).

And I mentioned it again here : #1735 (comment) , where @garrigue seemed to agree.

Copy link
Contributor

@lpw25 lpw25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct and the idea behind the change is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants